import request from '@/utils/request'

/**
 * AGV任务分页查询
 * @param {查询条件} data
 */
export function pageTaskAgv(query) {
  return request({
    url: 'TaskManage/TaskAgv/pageList',
    method: 'get',
    params: query,
  })
}

/**
 * 新增AGV任务
 * @param data
 */
export function addTaskAgv(data) {
  return request({
    url: 'TaskManage/TaskAgv',
    method: 'post',
    data: data,
  })
}
/**
 * 修改AGV任务
 * @param data
 */
export function updateTaskAgv(data) {
  return request({
    url: 'TaskManage/TaskAgv',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取AGV任务详情
 * @param {Id}
 */
export function getTaskAgv(id) {
  return request({
    url: 'TaskManage/TaskAgv/' + id,
    method: 'get'
  })
}

/**
 * 删除AGV任务
 * @param {主键} pid
 */
export function delTaskAgv(pid) {
  return request({
    url: 'TaskManage/TaskAgv/delete',
    method: 'POST',
    data: pid
  })
}
